<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html">

    <ui:define name="content">        
        <h:form>
            <p:panel id="phoneView" styleClass="noBorder summeryBorder">

                <p:commandButton value="Print" ajax="fasle" action="#" styleClass="noPrintButton">
                    <p:printer target="phoneView"/>           
                </p:commandButton>
                <p:commandButton ajax="false" action="/channel/channel_booking" value="Back" styleClass="noPrintButton"></p:commandButton>

                <p:dataTable  value="#{channelReportController.billSessionsNurse}" var="bs">
                    <f:facet name="header">
                        <p:outputLabel value="#{sessionController.loggedUser.institution.name}" style="fon"/><br></br>
                        <p:outputLabel value="#{sessionController.loggedUser.institution.address}"/><br></br>
                        <p:outputLabel value="Phone View"/>
                        <br></br>
                        <p:outputLabel value="Consultant : "/>
                        <p:outputLabel value="#{channelReportController.serviceSession.staff.person.nameWithTitle}"/><br></br>
                        <p:outputLabel value="Date : "/>
                        <h:outputLabel value="#{channelReportController.serviceSession.sessionDate}" >
                            <f:convertDateTime pattern="dd MM yyyy"/>
                        </h:outputLabel><br></br>
                        <p:outputLabel value="Session Name : "/>
                        <h:outputLabel value="#{channelReportController.serviceSession.name}" />
                    </f:facet>
                    <p:column headerText="No">#{bs.serialNo}</p:column>
                    <p:column headerText="Booking Id">
                        <p:outputLabel value="#{bs.bill.deptId}" rendered="#{bs.bill.paidBill eq null and sessionController.loggedPreference.applicationInstitution eq 'Cooperative'}"/>
                        <p:outputLabel value="#{bs.bill.paidBill.deptId}" rendered="#{bs.bill.paidBill ne null and sessionController.loggedPreference.applicationInstitution eq 'Cooperative'}"/>
                        <p:outputLabel value="#{bs.bill.insId}" rendered="#{bs.bill.paidBill eq null and sessionController.loggedPreference.applicationInstitution ne 'Cooperative'}"/>
                        <p:outputLabel value="#{bs.bill.paidBill.insId}" rendered="#{bs.bill.paidBill ne null and sessionController.loggedPreference.applicationInstitution ne 'Cooperative'}"/>
                    </p:column>
                    <p:column headerText="Patient Name">#{bs.bill.patient.person.nameWithTitle}</p:column>
                    <p:column headerText="Phone No">#{bs.bill.patient.person.phone}</p:column>

                    <p:column headerText="Time">
                        <h:outputLabel value="#{bs.sessionTime}">
                            <f:convertDateTime pattern="hh:mm:ss a"/>
                        </h:outputLabel>
                    </p:column>

                    <p:column headerText="P/A">  
                        <p:outputLabel value="Absent"  rendered="#{bs.absent}"/>  
                    </p:column>

                </p:dataTable>

            </p:panel>
        </h:form>
    </ui:define>



</ui:composition>
